#include "model.h"

int main()
{
    nn test;
    float* input=(float*)malloc(sizeof(float)*225);
    float* target=(float*)malloc(sizeof(float)*10);
    srand(time(NULL));
    for(int i=0;i<225;i++){
        input[i]=(rand()%3-1)/10;
    }
    for(int i=0;i<10;i++){
        target[i]=7;
    }
    std::cout<<"start forwarding"<<std::endl;
    for(int i=0;i<40;i++){ 
        tag::taghere("--------------------------------",i);
        test.forward(input,225);
        // tag::taghere("weight:",test.l4->weight[0],test.l1->output_num);
        tag::taghere("res8:",test.res8,10);
        tag::taghere("loss:",Func::MSELoss(test.res8,target,test.output_num,test.output_num));
        test.backward(target,0.01);
        // tag::taghere("newinput:",input,225);
        // tag::taghere("weight2:",test.l4->weight[0],test.l1->output_num);
    }
    
    return 0;
}